package com.kky.pp.base

import java.io.Serializable

class RegisterConfigBean(val configs:List<ConfigsBean> = arrayListOf()):Serializable {
    data class ConfigsBean(
        val additional: String?,//其它提示文案，多个文案采用'|'分隔，body shape选择更多取第一个文案，没有更多选项，取第二个文案 ,
        val backgroundPhoto: String,//背景图，多个背景图采用'|'分隔，性别女取第一张图片，男取第二张图片，queer取第三张图片 ,
        val bodyShapeForMan: ArrayList<GenderPreferListBean>?,//男：body shape选项 ,
        val bodyShapeForQueer: ArrayList<GenderPreferListBean>?,//Queer：body shape选项 ,
        val bodyShapeForWoman: ArrayList<GenderPreferListBean>?,//女：body shape选项 ,
        val firstContent: String?,//1级内容: 无值时不予显示 ,
        val firstTitle: String?,//1级标题：I want页面该字段无值，I want 选项不予显示 ,
        val iwantList: ArrayList<GenderPreferListBean>,
        val nickName: String?,// Nickname页面默认值 ,
        val pageType: Int,//注册页面：1.Age 2.Nickname 3.Gender 4.Photo 5.I want ,
        val secondContent: String?,//2级内容 ,
        val secondTitle: String?,//2级标题：Gender、I want页面，该字段无值时，body shape和You accept不予选择，同时取消至少选择一项控制 ,
        val youAcceptForMan: ArrayList<GenderPreferListBean>,//男&Queer: You accept选项 ,
        val youAcceptForWomen: ArrayList<GenderPreferListBean>//You accept选项
    ): Serializable{
       fun getYouAcceptQueer(): ArrayList<GenderPreferListBean>{
            val youAcceptQueer = arrayListOf<GenderPreferListBean>()
           youAcceptForMan.stream().forEach {
               val genderprefer = GenderPreferListBean(it.type,it.code,it.value,it.iconUrl,it.selected,it.extendInfo)
               youAcceptQueer.add(genderprefer)
           }
           return youAcceptQueer
        }
    }
}